﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlQuanLyThongTinVungDiaLy.ascx.cs" Inherits="UserControl_ControlQuanLyThongTinVungDiaLy" %>
 <%@ Import Namespace="webapp4U" %>
 <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
 <%@ Register assembly="DevExpress.Web.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPopupControl" tagprefix="dxpc" %>



<script type="text/javascript">
    function pageLoad() {
      
        $("#<%= btnSave.ClientID %>").click(function () {
            
                $.blockUI({ css: {
                    border: 'none',
                    padding: '15px',
                    backgroundColor: '#000',
                    '-webkit-border-radius': '10px',
                    '-moz-border-radius': '10px',
                    opacity: .5,
                    color: '#fff'
                }
                });
           
        });
        $("#<%= btnAdd.ClientID %>").click(function () {
            $.blockUI({ css: {
                border: 'none',
                padding: '15px',
                backgroundColor: '#000',
                '-webkit-border-radius': '10px',
                '-moz-border-radius': '10px',
                opacity: .5,
                color: '#fff'
            }
            });
        });
       
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
        function EndRequestHandler(sender, args) {
            $.unblockUI();
        }
    }

</script>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
     <div class="direct_container_right_titletop">
                     Quản lý thông tin vùng địa lý
                </div>
                
            
              
                     <!-- Content main-->
                <div class="direct_container_main">
                </div>
                  <cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" BackColor="#CCFFFF"
            Font-Names="Arial" Height="700px" Width="100%">
            <cc1:TabPanel ID="TabPanel1" runat="server" HeaderText="Nhập thông tin" TabIndex="0">
                <ContentTemplate>
                    <!-- Content main-->
                    <div class="direct_container_main">
                    <div class="direct_container_form_right">
                        <table border="0" width="100%">
                           
                            
                            <tr>
                                <td width="12%" align="right"><p class="direct_label">Mã vùng địa lý</p></td>
                                <td width="88%" align="left">
                                    <asp:DropDownList ID="DropAreaID" onselectedindexchanged="DropAreaID_SelectedIndexChanged"
                                     AutoPostBack="true" runat="server">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            
                            <tr>
                                <td align="right"><p class="direct_label">Tỉnh/Thành</p></td>
                                <td>
                                     <asp:DropDownList ID="ddlTinhThanh"  runat="server">
                                    </asp:DropDownList>
                                    <asp:Button ID="btnAdd" runat="server" CausesValidation="false" Text="Thêm Tỉnh/Thành" onclick="btnAdd_Click"/>
                                    <asp:Button ID="btnSave" runat="server" Text="Lưu" CausesValidation="true" onclick="btnSave_Click"/>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="4">
                                    <asp:GridView ID="grvDsTinh" 
                                         runat="server" AutoGenerateColumns="False" 
                                                        DataKeyNames="MaTinh" 
                                                        EnableModelValidation="True" 
                                                        onrowdeleting="grvDsTinh_RowDeleting" >
                                                        <Columns>
                                                            <asp:TemplateField HeaderText="Stt">
                                                                <HeaderTemplate>
                                                                    STT
                                                                </HeaderTemplate>
                                                                <ItemTemplate>
                                                                    <%# Container.DataItemIndex + 1 %>
                                                                </ItemTemplate>
                                                                <HeaderStyle HorizontalAlign="Left" Width="50px" />
                                                                <ItemStyle Height="40px" HorizontalAlign="Left" Width="50px" />
                                                            </asp:TemplateField>
                                                            
                                                            <asp:TemplateField HeaderText="Tên Tỉnh/Thành">
                                                                <HeaderTemplate>
                                                                    Mã Tỉnh/Thành
                                                                </HeaderTemplate>
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblMaTinh" runat="server" Text='<%# Eval("MaTinh")%>'></asp:Label>
                                                                </ItemTemplate>
                                                                <HeaderStyle HorizontalAlign="Left" Width="200px" />
                                                                <ItemStyle Height="40px" HorizontalAlign="Left" Width="200px" />
                                                            </asp:TemplateField>
                                                            
                                                             <asp:TemplateField HeaderText="Tên Tỉnh/Thành">
                                                                <HeaderTemplate>
                                                                    Tên Tỉnh/Thành
                                                                </HeaderTemplate>
                                                                <ItemTemplate>
                                                                    <%# Eval("TinhThanh")%>
                                                                </ItemTemplate>
                                                                <HeaderStyle HorizontalAlign="Left" Width="200px" />
                                                                <ItemStyle Height="40px" HorizontalAlign="Left" Width="200px" />
                                                            </asp:TemplateField>
                                                            
                                                            <asp:CommandField  ButtonType="Image" DeleteText="Xóa" 
                                                                DeleteImageUrl="~/images/delete.png" CausesValidation="False" HeaderText="Xóa" 
                                                                ShowDeleteButton="True" >
                                                                <ControlStyle Height="25px" Width="25px" />
                                                                <ItemStyle Height="25px" Width="25px" />
                                                            </asp:CommandField>                                                          
                                                            
                                                        </Columns>
                                                    </asp:GridView>
                                </td>
                            </tr>
                        </table>
                    </div>
                       </div>
                <!-- EndContent main-->
                 </ContentTemplate>
            </cc1:TabPanel>
            <cc1:TabPanel ID="TabPanel3" runat="server" HeaderText="Hướng dẫn" TabIndex="1">
             <ContentTemplate>
             <div class="direct_container_main">
             <div class="direct_container_form_right">
               <table border="0" width="100%">
                 <tr>
                          <td width="12%" align="right"><p class="direct_label">Mô tả:</p></td>
                                    <td width="88%" align="left">
                                        Quản lý thông tin vùng địa lý của Fimex.Ví dụ như vùng Center gồm có :Đà Nẵng,Quảng Bình,
                                        Quảng Trị,Thừa Thiên Huế,Quảng Nam,Quảng Ngãi,Kon Tum,Bình Định,Gia Lai.
                                        
                                    </td>
                 </tr>
                 <tr>
                          <td colspan="2">1.Nếu bạn muốn thêm hoặc bớt Tỉnh/Thành trong các vùng địa thì chọn Tỉnh/Thành trong
                            Ô Tỉnh/Thành,sau đó nhấn nút thêm và cuối cùng click nút lưu</td>
                                   
                 </tr>
                
              
                
               </table>
                                                            </div>
            </div>
                                                            </ContentTemplate>
                                                            </cc1:TabPanel>
                </cc1:TabContainer> 
            <dxpc:ASPxPopupControl ID="MessageBox" PopupHorizontalAlign="WindowCenter"  PopupVerticalAlign="WindowCenter" Font-Bold="true" HeaderText="DRM-S" runat="server" Height="91px" 
        Width="601px">
        <ContentCollection>
<dxpc:PopupControlContentControl ID="PopupControlContentControl1" runat="server" SupportsDisabledAttribute="True"></dxpc:PopupControlContentControl>
</ContentCollection>
    </dxpc:ASPxPopupControl>
    </ContentTemplate>
</asp:UpdatePanel>
